package com.xuzhao.enums;

/**
 * Created by xz on 2017/9/3.
 * 定义返回码方便管理
 */
public enum ResultEnum {
    UNKONW_ERROR(-100,"系统未知错误"),//没有处理的异常
    SUCCESS(0,"SUCCES"),
    MESSAGE_NOTFOND(101,"用户信息不存在"),
    CANNOT_DELETE_BYOUND80(102,"不能删除年龄大于80岁的"),
    ERROR(-1,"操作出错"),
    VALIDATE_FALSE(-99,"验证不通过")
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
